import _import from '@/router/_import'
import Layout from '@/views/layout'

/**
 * 系统管理路由表
 */
export const SystemRouterMap = [
    {
        path: '',
        component: Layout,
        redirect: '/dashboard',
        noDropDown: true,
        children: [
            {
                path: 'dashboard',
                name: '仪表盘',
                icon: 'el-icon-location-outline',
                component: _import('dashboard/System')
            }
        ]
    },

    {
        path: '/ucenter',
        name: '用户中心',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {path: 'register', name: '注册用户', icon: 'el-icon-menu', component: _import('ucenter/RegisterUser')},
            {path: 'third-party', name: '第三方用户', icon: 'el-icon-menu', component: _import('ucenter/ThirdPartyUser')}
        ]
    },

    {
        path: '/upms',
        name: '授权中心',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'app',
                name: '应用管理',
                icon: 'el-icon-menu',
                component: _import('upms/App'),
                meta: {auth: 'upms:app:index'}
            },
            {
                path: 'menu',
                name: '菜单管理',
                icon: 'el-icon-menu',
                component: _import('upms/Menu'),
                meta: {auth: 'upms:menu:index'}
            },
            {
                path: 'permission',
                name: '权限管理',
                icon: 'el-icon-menu',
                component: _import('upms/Permission'),
                meta: {auth: 'upms:permission:index'}
            },
            {
                path: 'organization',
                name: '组织管理',
                icon: 'el-icon-menu',
                component: _import('upms/Organization'),
                meta: {auth: 'upms:organization:index'}
            },
            {
                path: 'user',
                name: '用户管理',
                icon: 'el-icon-menu',
                component: _import('upms/User'),
                meta: {auth: 'upms:user:index'}
            },

            {
                path: 'role',
                name: '角色管理',
                icon: 'el-icon-menu',
                noDropDown: true,
                component: _import('upms/role/index'),
                redirect: '/upms/role/list',
                meta: {auth: 'upms:role:index'},
                children: [
                    {
                        path: 'list',
                        name: '角色列表',
                        icon: 'el-icon-menu',
                        component: _import('upms/role/List'),
                        meta: {auth: 'upms:role:role_user_list'},
                    },
                    {
                        path: 'role_user_list',
                        name: '角色成员列表',
                        icon: 'el-icon-menu',
                        component: _import('upms/role/MemberList'),
                        meta: {auth: 'upms:role:role_user_list'},
                    },
                    {
                        path: 'role_add_permission',
                        name: '添加权限',
                        icon: 'el-icon-menu',
                        component: _import('upms/role/AddPermission'),
                        meta: {auth: 'upms:role:role_add_permission'},
                    }
                ]
            },
            {
                path: 'group',
                name: '群组管理',
                icon: 'el-icon-menu',
                noDropDown: true,
                component: _import('upms/group/index'),
                redirect: '/upms/group/list',
                meta: {auth: 'upms:group:index'},
                children: [
                    {
                        path: 'list',
                        name: '群组列表',
                        icon: 'el-icon-menu',
                        component: _import('upms/group/List'),
                        meta: {auth: 'upms:group:group_user_list'},
                    },
                    {
                        path: 'group_user_list',
                        name: '群组成员列表',
                        icon: 'el-icon-menu',
                        component: _import('upms/group/MemberList'),
                        meta: {auth: 'upms:group:group_user_list'},
                    },
                ]
            }
        ]
    },

    {
        path: '/system',
        name: '系统管理',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'session',
                name: '会话管理',
                icon: 'el-icon-menu',
                component: _import('system/Session'),
                meta: {auth: 'system:session:index'}
            },
            {path: 'latticePoint', name: '网点查询', icon: 'el-icon-menu', component: _import('system/LatticePoint')},
            {path: 'oss', name: '云存储管理', icon: 'el-icon-menu', component: _import('system/Oss')},
        ]
    }
]

